﻿Imports Microsoft.VisualBasic
Imports System.Data
Imports System.Data.SqlClient

Public Class clsFamilias
    Inherits clsDatos

    Function Get_Familias() As DataTable

        Return GetDatos("select * from artfam order by familia")

    End Function

    Function Get_Familias(ByVal strGrupo As String) As DataTable

        'Return GetDatos("select * from artfam order by familia")   
        Return GetDatos("select distinct familia from art where grupo='" & strGrupo & "' order by familia")

    End Function

    Function Get_Familias(ByVal strGrupo As String, ByVal strFamilia As String) As DataTable

        Return GetDatos("Select distinct familia from art where grupo='" & strGrupo & "' and familia like '" & strFamilia & "'")

    End Function

    'Function Get_Familia(ByVal strFamilia As String) As SqlClient.SqlDataReader

    '    Return GetRegistro("Select * from artfam where familia='" & strFamilia & "'")

    'End Function

    Function Get_Cosechas(ByVal strFamilia As String) As DataTable

        Return GetDatos("Select distinct vacacosecha from art where familia='" & strFamilia & "'")

    End Function

End Class
